/******************************************************************************
COPYRIGHT (C) 2013 by IT-Designers GmbH

File:		StringIdObject.h
Created:	12.04.2013
Modified:	12.04.2013
Author:		Max Pejs
******************************************************************************/

#ifndef STRINGIDOBJECT_H
#define STRINGIDOBJECT_H

#include <iostream>
using namespace std;

class StringIdObject
{
private:
	string id;

public:
	StringIdObject(string s);
	virtual ~StringIdObject();
	string Id() const;

	bool operator== (const StringIdObject &other) const;

	class Comparator
	{
	private:
		const StringIdObject * exp_obj;

	public:
		Comparator(const StringIdObject * _exp_obj) : exp_obj(_exp_obj){}
		bool operator()(const StringIdObject * r1) const
		{ 
			return this->exp_obj->Id().compare(r1->Id()) == 0;
		}
	};
};

#endif	// STRINGIDOBJECT_H